package com.eshin.container;

import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer;

import com.eshin.connectionfactory.MyConnectionFactory;


public class MyRabbitListenerContainerFactory extends SimpleRabbitListenerContainerFactory {
	
	private MyConnectionFactory connectionFactory;
	public MyRabbitListenerContainerFactory(MyConnectionFactory connectionFactory) {
		this.connectionFactory = connectionFactory;
	}
	
	public MyRabbitListenerContainerFactory(SimpleRabbitListenerContainerFactoryConfigurer configurer,
			MyConnectionFactory connectionFactory2) {
		// TODO Auto-generated constructor stub
	}

	@Override
	protected SimpleMessageListenerContainer createContainerInstance() {
		// TODO Auto-generated method stub
		MyMessageListenerContainer myMessageListenerContainer = new MyMessageListenerContainer(connectionFactory);
		myMessageListenerContainer.init();
		return myMessageListenerContainer;
	}
}
